home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
T-COMAL Today
/
(k)t4.d64
/
dumptext1525.l
< prev
next >
Wrap
Text File
|
2007-02-28
|
4KB
|
140 lines
8000 //DELETE"0:DUMPTEXT1525.L"
8005 // BY LOREN WRIGHT
8010 //LIST "0:DUMPTEXT1525.L"
8015 //
8020 // ░└└└└└└└└└└└└└└└└└«
8025 // ▌ 1525 ╨╔╪┼╠ ─╒═╨ ▌
8030 // ░└└▒└└└└└└└└└└└└└└└└└▒└└«
8035 // ▌ BY ╠OREN ╫RIGHT 7/5/4 ▌
8040 // ░└└▒└└└└└└└└└└└└└└└└└└└└└└└▒└└«
8045 // ▌ ╞OR ╥┴═ OR ╥╧═ CHAR SCREENS.▌
8050 // ▌ AUTOMATICALLY DETERMINES ▌
8055 // ▌ SCREEN & CHARSET LOCATION. ▌
8060 // ▌ ├ALL WITH: ╨╔╪┼╠'─╒═╨ ▌
8065 // ½└└└└└└└└└└└└└└└└└└└└└└└└└└└└└│
8070 // ▌> ╘╚╔╙ ╔╙ ┴ ╘┼╪╘╙├╥┼┼╬ ─╒═╨ <▌
8075 // ▌╔╘ ╫╧╬'╘ ├╧╨┘ ╘╚┼ ╚╔╥┼╙ ╙├╥╬ ▌
8080 // ¡└└└└└▓└└└└└└└└└└└└└└└└└▓└└└└└╜
8085 // ▌ ╘╥╒┼ 8 ┬╔╘ ─╒═╨ ▌
8090 // ¡└└└└└└└└└└└└└└└└└╜
8095 //
8100 DIM BYTE#(0:39,0:6), A$ OF 320, B$ OF 8
8105 PROC PIXEL'DUMP
8110 IF PEEK(832)<>162 THEN INSTALL
8115 OPEN FILE 1,"",UNIT 4,0,WRITE
8120 INITIALIZE //FIND SCREEN & CHARSET
8125 STOPFLAG:=FALSE
8130 PRINT FILE 1: CHR$(8); //GRAPHICS MODE
8135 FOR GROUP#:=0 TO 21 STEP 7 DO //7 CHAR ROWS TAKE
8140 FOR PRINT'PASS#:=0 TO 7 DO //8 PRINT-HEAD PASSES
8145 IF GROUP#=21 AND PRINT'PASS#=4 THEN STOPFLAG:=TRUE //LAST PASS?
8150 A$:=""
8155 GET'BYTE //FILL ARRAY WITH DATA FOR ENTIRE PRINT PASS
8160 FOR COLUMN#:=0 TO 39 DO
8165 BIT'BANG //CONVERT HORIZONTAL CHAR BYTES TO VERTICAL PRINT-HEAD BYTES
8170 A$:=A$+B$
8175 ENDFOR COLUMN#
8180 PRINT FILE 1: A$
8185 IF STOPFLAG THEN PRINT'PASS#:=7
8190 ENDFOR PRINT'PASS#
8195 ENDFOR GROUP#
8200 CLOSE FILE 1
8205 ENDPROC PIXEL'DUMP
8210 //
8215 PROC INITIALIZE
8220 SET:=LAND(PEEK(53272),14)/2
8225 BEGIN'SCREEN:=LAND(PEEK(53272),240)/16
8230 BANK:=3-LAND(PEEK(56576),3)
8235 W:=(BANK=0 OR BANK=2) AND (SET=2 OR SET=3)
8240 IF W THEN //TRUE=╥╧═ CHARS
8245 ADDR:=(SET-2)*2048+53248
8250 ELSE
8255 ADDR:=BANK*16384+SET*2048
8260 ENDIF
8265 ENDPROC INITIALIZE
8270 //
8275 PROC GET'BYTE
8280 //
8285 FOR COLUMN#:=0 TO 39 DO
8290 CX#:=BEGIN'SCREEN*1024+BANK+COLUMN#
8295 IF PRINT'PASS#>0 THEN
8300 BYTE#(COLUMN#,0):=PEEK(CX#+40*(GROUP#+PRINT'PASS#-1))
8305 ENDIF
8310 IF PRINT'PASS#<7 THEN
8315 BYTE#(COLUMN#,1):=PEEK(CX#+40*(GROUP#+PRINT'PASS#))
8320 ENDIF
8325 ENDFOR COLUMN#
8330 //
8335 IF W THEN //SWITCH I/O OUT,CHAR ╥╧═ IN
8340 POKE 56334,LAND(PEEK(56334),254)
8345 POKE 1,LAND(PEEK(1),251)
8350 ENDIF
8355 //
8360 FOR COLUMN#:=0 TO 39 DO
8365 I#:=0
8370 C1#:=BYTE#(COLUMN#,0)
8375 C2#:=BYTE#(COLUMN#,1)
8380 IF PRINT'PASS#>0 THEN
8385 FOR J#:=8-PRINT'PASS# TO 7 DO
8390 BYTE#(COLUMN#,I#):=PEEK(ADDR+C1#*8+J#)
8395 I#:+1
8400 ENDFOR J#
8405 ENDIF
8410 IF PRINT'PASS#<7 THEN
8415 FOR J#:=0 TO 6-PRINT'PASS# DO
8420 BYTE#(COLUMN#,I#):=PEEK(ADDR+C2#*8+J#)
8425 I#:+1
8430 ENDFOR J#
8435 ENDIF
8440 ENDFOR COLUMN#
8445 IF W THEN //SWITCH CHAR ╥╧═ OUT, ╔/╧ IN
8450 POKE 1,LOR(PEEK(1),4)
8455 POKE 56334,LOR(PEEK(56334),1)
8460 ENDIF
8465 ENDPROC GET'BYTE
8470 //
8475 FUNC LOGICAL'SET'UP(NUM#,MASK#,OP#) CLOSED //FROM ├╧═┴╠ ╘ODAY #1
8480 POKE 2024,169
8485 POKE 2025,NUM#
8490 POKE 2026,OP#
8495 POKE 2027,MASK#
8500 POKE 2028,141
8505 POKE 2029,240
8510 POKE 2030,7
8515 POKE 2031,96
8520 SYS 2024
8525 RETURN PEEK(2032)
8530 ENDFUNC LOGICAL'SET'UP
8535 //
8540 FUNC LAND(NUM#,MASK#) CLOSED
8545 RETURN LOGICAL'SET'UP(NUM#,MASK#,41)
8550 ENDFUNC LAND
8555 //
8560 FUNC LOR(NUM#,MASK#) CLOSED
8565 RETURN LOGICAL'SET'UP(NUM#,MASK#,9)
8570 ENDFUNC LOR
8575 //
8580 PROC INSTALL CLOSED
8585 FOR I#:=832 TO 881 DO
8590 READ X#
8595 POKE I#,X#
8600 ENDFOR I#
8605 DATA 162,7,169,0,157,128,3,168,185,120,3,61,106,3,240,9
8610 DATA 185,106,3,29,128,3,157,128,3,200,192,7,144,234,169,128
8615 DATA 29,128,3,157,128,3,202,16,217,96,1,2,4,8,16,32
8620 DATA 64,128
8625 ENDPROC INSTALL
8630 //
8635 PROC BIT'BANG
8640 FOR I#:=0 TO 6 DO //7 INPUT BYTES
8645 POKE 888+I#,BYTE#(COLUMN#,I#)
8650 ENDFOR I#
8655 SYS 832
8660 B$:=""
8665 FOR I#:=7 TO 0 STEP -1 DO //8 OUTPUT BYTES
8670 X#:=PEEK(896+I#)
8675 IF STOPFLAG THEN X#:=LAND(X#,143)
8680 B$:=B$+CHR$(X#)
8685 ENDFOR I#
8690 ENDPROC BIT'BANG